package com.baike.controller;

import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.baike.dao.FileDao;
import com.baike.model.UserEntity;

import sun.misc.FDBigInteger;

@Controller
public class FileController {
@RequestMapping("/uploadFile/{id}")
public String uploadFile(@PathVariable(value="id") Integer id,HttpSession session){
	session.setAttribute("entry_id", id);
	UserEntity user=((UserEntity)session.getAttribute("userutil"));
	session.setAttribute("author_id",user.getId());
	return "/file/FileUpload";
}
@RequestMapping("/listUncheckedFile")
public String getFileList(Map<String,Object> map){
	map.put("file", FileDao.getAllUncheckedFile());
	return "/file/fileList";
}

}
